<template>

  <el-scrollbar @click.stop class="menu" v-if="menu">
    <el-menu 
      :router="true"
      @select="$emit('update:menu' , false)"
    >
        <Items :items="items"/>
    </el-menu>
  </el-scrollbar>
</template>

<script>

import {
  mapGetters
} from 'vuex' ;

import Items from './menu/Items' ;

export default {
  props: [
    'menu'
  ],

  components:{
    Items
  },

  emits:[
    'update:menu'
  ],

  computed:{
    ...mapGetters('Menu' , {
      items:'all'
    })
  }
};
</script>

<style lang="scss" scoped>
.menu {
  background-color: #fff;
  box-shadow: 1px 0 2px 0 rgba(0, 0, 0, 0.16);
  padding: 8px 0px  8px 12px;
}
</style>
